<extend file='resource/admin/wechat'/>
<block name="content">
    <!-- TAB NAVIGATION -->
    <ul class="nav nav-tabs" role="tablist">
        <li class="active"><a href="{{url('wx.index')}}">微信基本消息管理</a></li>
        <li><a href="{{url('wx.post')}}" >添加基本回复</a></li>
    </ul>
    <table class="table table-hover">
        <thead>
        <tr>
            <th width="8%">编号</th>
            <th>关键词</th>
            <th>关键词回复语</th>
            <th>模块</th>
        </tr>
        </thead>
        <tbody>
        <foreach from="$join" value="$d">
            <tr>
                <td>{{$d['kid']}}</td>
                <td>{{$d['keywords']}}</td>
                <td>{{$d['content']}}</td>
                <td>{{$d['module']}}</td>
                <td>
                    <div class="btn-group btn-group-sm">
                        <a href="{{url('wx.post','',['id'=>$d['id']])}}" class="btn btn-success">编辑</a>
                        <a href="javascript:;" onclick="del({{$d['id']}})" class="btn btn-danger">删除</a>
                    </div>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
             <div>
                 {{$join->links()}}
             </div>
    <script>
        function del(id){
            util.confirm('确定删除吗',function(res){

                location.href = "{{url('wx.del')}}&id="+id;
            })
        }
    </script>
</block>
